package com.mtsmda.web;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

import com.mtsmda.daoI.CustomerDAOI;

public class WSProvider {

	public static CustomerDAOI customerWS() {
		try {
			URL wsdlUrl = new URL(Constants.CUSTOMER_WS_URL_WSDL);
			QName qName = new QName(Constants.CUSTOMER_WS_URL,
					Constants.CUSTOMER_WS_SERVICE);
			Service service = Service.create(wsdlUrl, qName);
			CustomerDAOI customerDAOI = service.getPort(CustomerDAOI.class);
			return customerDAOI;

		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}